package xcookie

import (
	"gitee.com/xiedongji/antgo/cpts/xcfg"
	"github.com/gin-gonic/gin"
)

func SetCookie(ctx *gin.Context, key, val string) {
	ctx.SetCookie(key, val, 365*86400, "/", xcfg.GetString("http.host"), false, false)
}

func RemoveCookie(ctx *gin.Context, key string) {
	ctx.SetCookie(key, "", -1, "/", xcfg.GetString("http.host"), false, true)
}
